﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="create-role.aspx.cs" Inherits="famails.BackEnd.page.create_role" MasterPageFile="~/Master.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
	 <script>
	     function checkAll() {
	         var checked = !$(this).data('checked');
	         $('input:checkbox').prop('checked', checked);
	         $(this).data('checked', checked);
	     }
    </script>
    <div style="width:100%;padding:10px;">
        <!--start content 01-->
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border:1px solid #333;padding:0px;margin-bottom:10px;">
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:10px 20px;background:#000;color:#fff;font-size:18px;font-weight:bold;position:relative;">   
               Quản lý phân quyền - <asp:Label ID="lblDepartmentName" runat="server" Text=""></asp:Label>
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
			  <asp:Panel Visible="false" ID="pnError" runat="server">
                <div class="error-box round">
                    <asp:Label ID="lblError"  runat="server" Text=""></asp:Label> 
                </div>
              </asp:Panel>
              <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                <div class="confirmation-box round">
                    <asp:Label ID="lblSuccess"  runat="server" Text=""></asp:Label> 
                </div>
              </asp:Panel>
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
                <fieldset>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Hệ thống phân quyền FAMAIL</label><br />
                        <small>Lưu ý: Tùy chọn chức năng chính sẽ quyết định các chức năng chi tiết !</small>                     
                </fieldset>
            </div>
            <asp:HiddenField ID="hdfDepartmentId" runat="server" />
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
                
                <fieldset>
                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                        <thead>
                            <tr>
                                <th style="text-align:center;width:50px;"><input type="checkbox" onclick="checkAll()" class="chk_sty" value = "All"  /></th>
                                <th>Quyền hạn</th>
                            </tr>
                        </thead>
                        <tbody>
                    <asp:Repeater ID="dlRoleList" runat="server">
                         <ItemTemplate>
                            <tr>
                                <td style="text-align:center">
                                    <asp:HiddenField ID="hdfRoleId" runat="server" /> 
                                    <asp:CheckBox ID="chkCheck" runat="server" />
                                </td>
                                <td>
                                    <asp:Label ID="lblRoleName" runat="server"></asp:Label>    
                                </td>
                            </tr>     
                         </ItemTemplate>
                     </asp:Repeater>
                        </tbody>
                    </table>
                </fieldset>
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
                <button runat="server" class="btn" style="border:1px solid #333;border-radius:0px;background:#333;color:#fff;padding:7px 15px;" onserverclick="lbtChangeRole_Click">
                    <i class="fa fa-upload"></i> Thay đổi quyền
                </button>

            </div>
        </div>
        <asp:Panel ID="PanelAdvanceRole" runat="server">                  
					<div class="half-size-column fr">
					 
					<div style="background-color: #5d6677;height:13px;
					    padding: 14px;text-transform: uppercase;color: white; margin-top:18px">
                        <asp:CheckBox ID="chkAdvance" runat="server" />  Phân quyền nâng cao
					</div> 	
					   		
					    <fieldset>  
					    
					    <asp:Panel Visible="false" ID="PanelAdvance" runat="server">
                            <div class="error-box round">
                                <asp:Label ID="lblAdvanceError"  runat="server" Text=""></asp:Label> 
                            </div>
                         </asp:Panel>	
                         <asp:Panel Visible="false" ID="PanelAdvanceSuccess" runat="server">
                            <div class="confirmation-box round">
                                <asp:Label ID="lblAdvanceSuccess"  runat="server" Text=""></asp:Label> 
                            </div>
                         </asp:Panel>			        
				            <p>
							    <label for="simple-input">Hạng ngạch gửi mail</label>   
							     								
                                <asp:TextBox ID="txtLimitMailSend" Width="100px" CssClass="round default-width-input" 
                                    runat="server"></asp:TextBox>&nbsp Đến ngày
                                 
                                <asp:TextBox ID="txtToDate" Width="200px" CssClass="round default-width-input" 
                                    runat="server"></asp:TextBox>
						    </p>
						    <p>
							    <label for="simple-input">Hạng ngạch tạo khách hàng</label>    								
                                <asp:TextBox ID="txtLimitCreateCustomer" Width="100px" CssClass="round default-width-input" 
                                    runat="server"></asp:TextBox>
                                                                    
						    </p>
					        <asp:LinkButton ID="lbtChangeAdvance" runat="server" Height="15px" 
                               CssClass="button round blue image-right ic-add text-upper" 
                                Text="Chấp nhận" onclick="lbtChangeAdvance_Click">
                             </asp:LinkButton> 	
					    </fieldset>
					</div>
        </asp:Panel>

    </div>

<script type="text/javascript">
    $(function () {
        $('#ContentPlaceHolder1_txtToDate').datetimepicker({
            timeFormat: "", dateFormat: "dd/mm/yy"
        });
    });
</script>

<%--<script>
    $(document).ready(function () {
        $('#dataTables-example').dataTable();
    });
</script>--%>
</asp:Content>

